<template>
    <div class="Child">
        <input type="text" 
        :value="ming"
        @input="emit('update:ming',(<HTMLInputElement>$event.target).value)"
        >
        <input type="text" 
        :value="mima"
        @input="emit('update:mima',(<HTMLInputElement>$event.target).value)"
        >
    </div>
</template>

<script lang="ts" setup name="Child1">
    import {ref} from "vue"
    //数据
    defineProps(['ming','mima'])
    const emit = defineEmits(['update:ming','update:mima'])
</script>

<style scoped>
    .Child{
        background-color: orange;
        width: 1000px;
        height: 200px;
    }
    input{
        border: 2px solid black;
        background-image: linear-gradient(45deg,red,yellow,green);
        height: 30px;
        font-size: 20px;
        color: white;

    }
</style>